<?php

# 
# Copyright (c) 2002-2007 Eric Wallengren
# This file is part of the Continuous Automated Build and Integration 
# Environment (CABIE)
# 
# CABIE is distributed under the terms of the GNU General Public
# License version 2 or any later version.  See the file COPYING for copying 
# permission or http://www.gnu.org. 
#                                                                            
# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR  
# IMPLIED, without even the implied warranty of MERCHANTABILITY or FITNESS 
# FOR A PARTICULAR PURPOSE.  ANY USE IS AT YOUR OWN RISK. 
#                                                                            
# Permission to modify the code and to distribute modified code is granted, 
# provided the above notices are retained, and a notice that the code was 
# modified is included with the above copyright notice. 
# 

    class menuperms {

        function __construct() {

            $this->jobmenu   = array(
                'expand'     => 0,
                'killjob'    => 50,
                'enable'     => 50,
                'editor'     => 99,
                'removejob'  => 99,
                'teststatus' => 0,
                'debug'      => 1,
                'instruct'   => 0,
                'lastchange' => 0,
                'pending'    => 0,
            );
        
            $this->servermenu = array(
                'home'       => 0,
                'expand'     => 0,
                'collapse'   => 0,
                'sysinfo'    => 0,
                'processes'  => 0,
                'teststatus' => 0,
                'set'        => 0,
                'removed'    => 0,
                'servers'    => 0,
                'dumpconfig' => 99,
                'shutdown'   => 99,
                'users'      => 1,
                'login'      => 0,
                'logout'     => 0,
            );
       
        }

        function _servermenucount() {
    
            return count($this->servermenu);

        }

        function _jobmenucount() {
    
            return count($this->servermenu);

        }

        function _servermenu($cmd) {

            return($this->servermenu{"$cmd"});

        }

        function _jobmenu($cmd) {

            return($this->jobmenu{"$cmd"});

        }
     
        function __destruct(){}
         
    }


?>
